package com.example.myapplication.Helper;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class TodayHelper extends SQLiteOpenHelper {
    public TodayHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    //第一次调用时创建表
    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        //创建表
        String sql="create table today(id integer primary key autoincrement,title text,year text,month text,day text,hour text,min text,book text)";
        sqLiteDatabase.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }

    }
